\(\int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx\) [588]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 54 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=-\frac {3}{2} a b \sqrt {1-x^2}-\frac {1}{2} b (a+b x) \sqrt {1-x^2}+\frac {1}{2} \left (2 a^2+b^2\right ) \arcsin (x) \]

[Out]

1/2*(2*a^2+b^2)*arcsin(x)-3/2*a*b*(-x^2+1)^(1/2)-1/2*b*(b*x+a)*(-x^2+1)^(1/2)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {757, 655, 222} \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=\frac {1}{2} \left (2 a^2+b^2\right ) \arcsin (x)-\frac {3}{2} a b \sqrt {1-x^2}-\frac {1}{2} b \sqrt {1-x^2} (a+b x) \]

[In]

Int[(a + b*x)^2/Sqrt[1 - x^2],x]

[Out]

(-3*a*b*Sqrt[1 - x^2])/2 - (b*(a + b*x)*Sqrt[1 - x^2])/2 + ((2*a^2 + b^2)*ArcSin[x])/2

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 757

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*((a + c*x^2)^(p
 + 1)/(c*(m + 2*p + 1))), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m + 2*p + 1) - a*e^
2*(m - 1) + 2*c*d*e*(m + p)*x, x]*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2,
0] && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, 0, c, d, e, m
, p, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{2} b (a+b x) \sqrt {1-x^2}-\frac {1}{2} \int \frac {-2 a^2-b^2-3 a b x}{\sqrt {1-x^2}} \, dx \\ & = -\frac {3}{2} a b \sqrt {1-x^2}-\frac {1}{2} b (a+b x) \sqrt {1-x^2}-\frac {1}{2} \left (-2 a^2-b^2\right ) \int \frac {1}{\sqrt {1-x^2}} \, dx \\ & = -\frac {3}{2} a b \sqrt {1-x^2}-\frac {1}{2} b (a+b x) \sqrt {1-x^2}+\frac {1}{2} \left (2 a^2+b^2\right ) \sin ^{-1}(x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.96 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=-\frac {1}{2} b (4 a+b x) \sqrt {1-x^2}+\left (2 a^2+b^2\right ) \arctan \left (\frac {x}{-1+\sqrt {1-x^2}}\right ) \]

[In]

Integrate[(a + b*x)^2/Sqrt[1 - x^2],x]

[Out]

-1/2*(b*(4*a + b*x)*Sqrt[1 - x^2]) + (2*a^2 + b^2)*ArcTan[x/(-1 + Sqrt[1 - x^2])]

Maple [A] (verified)

Time = 2.23 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.70

method result size
risch \(\frac {b \left (b x +4 a \right ) \left (x^{2}-1\right )}{2 \sqrt {-x^{2}+1}}+\left (a^{2}+\frac {b^{2}}{2}\right ) \arcsin \left (x \right )\) \(38\)
default \(a^{2} \arcsin \left (x \right )+b^{2} \left (-\frac {x \sqrt {-x^{2}+1}}{2}+\frac {\arcsin \left (x \right )}{2}\right )-2 a b \sqrt {-x^{2}+1}\) \(42\)
trager \(-\frac {b \left (b x +4 a \right ) \sqrt {-x^{2}+1}}{2}+\frac {\left (2 a^{2}+b^{2}\right ) \operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \ln \left (\operatorname {RootOf}\left (\textit {\_Z}^{2}+1\right ) \sqrt {-x^{2}+1}+x \right )}{2}\) \(57\)
meijerg \(\frac {i b^{2} \left (i \sqrt {\pi }\, x \sqrt {-x^{2}+1}-i \sqrt {\pi }\, \arcsin \left (x \right )\right )}{2 \sqrt {\pi }}-\frac {a b \left (-2 \sqrt {\pi }+2 \sqrt {\pi }\, \sqrt {-x^{2}+1}\right )}{\sqrt {\pi }}+a^{2} \arcsin \left (x \right )\) \(69\)

[In]

int((b*x+a)^2/(-x^2+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*b*(b*x+4*a)*(x^2-1)/(-x^2+1)^(1/2)+(a^2+1/2*b^2)*arcsin(x)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.91 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=-{\left (2 \, a^{2} + b^{2}\right )} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) - \frac {1}{2} \, {\left (b^{2} x + 4 \, a b\right )} \sqrt {-x^{2} + 1} \]

[In]

integrate((b*x+a)^2/(-x^2+1)^(1/2),x, algorithm="fricas")

[Out]

-(2*a^2 + b^2)*arctan((sqrt(-x^2 + 1) - 1)/x) - 1/2*(b^2*x + 4*a*b)*sqrt(-x^2 + 1)

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.78 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=a^{2} \operatorname {asin}{\left (x \right )} - 2 a b \sqrt {1 - x^{2}} - \frac {b^{2} x \sqrt {1 - x^{2}}}{2} + \frac {b^{2} \operatorname {asin}{\left (x \right )}}{2} \]

[In]

integrate((b*x+a)**2/(-x**2+1)**(1/2),x)

[Out]

a**2*asin(x) - 2*a*b*sqrt(1 - x**2) - b**2*x*sqrt(1 - x**2)/2 + b**2*asin(x)/2

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.78 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=-\frac {1}{2} \, \sqrt {-x^{2} + 1} b^{2} x + a^{2} \arcsin \left (x\right ) + \frac {1}{2} \, b^{2} \arcsin \left (x\right ) - 2 \, \sqrt {-x^{2} + 1} a b \]

[In]

integrate((b*x+a)^2/(-x^2+1)^(1/2),x, algorithm="maxima")

[Out]

-1/2*sqrt(-x^2 + 1)*b^2*x + a^2*arcsin(x) + 1/2*b^2*arcsin(x) - 2*sqrt(-x^2 + 1)*a*b

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.65 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=\frac {1}{2} \, {\left (2 \, a^{2} + b^{2}\right )} \arcsin \left (x\right ) - \frac {1}{2} \, {\left (b^{2} x + 4 \, a b\right )} \sqrt {-x^{2} + 1} \]

[In]

integrate((b*x+a)^2/(-x^2+1)^(1/2),x, algorithm="giac")

[Out]

1/2*(2*a^2 + b^2)*arcsin(x) - 1/2*(b^2*x + 4*a*b)*sqrt(-x^2 + 1)

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.65 \[ \int \frac {(a+b x)^2}{\sqrt {1-x^2}} \, dx=\mathrm {asin}\left (x\right )\,\left (a^2+\frac {b^2}{2}\right )-\left (\frac {x\,b^2}{2}+2\,a\,b\right )\,\sqrt {1-x^2} \]

[In]

int((a + b*x)^2/(1 - x^2)^(1/2),x)

[Out]

asin(x)*(a^2 + b^2/2) - (2*a*b + (b^2*x)/2)*(1 - x^2)^(1/2)